-- card: 28875 from stack: in.0-2 -- bmap block id: 36820 -- flags: 0000 -- background id: 18737 -- name: ScrollingCard ----- HyperTalk script ----- -- This handler stores the name of the last card. on goBack go cd "Cards" of stack "Intro to HyperCard 2.0" end goBack on closeCard put "abcd" into line 1 of cd fld "gorillaFld" put "efgh" into line 2 of cd fld "gorillaFld" put "ijkl" into line 3 of cd fld "gorillaFld" set the scroll of cd fld "GorillaFld" to 0 set the loc of btn "thumb" to 292,206 end closeCard on moveGorilla str put item 2 of the mouseLoc into V2 put abs(V2 - str) into buttonMove if V2 > str then moveDown buttonMove else if V2 < str then moveUp buttonMove end if end if end moveGorilla on moveDown str put str * 2 into theScroll if theScroll < 114 then set the scroll of cd fld "GorillaFld" to theScroll else set the scroll of cd fld "GorillaFld" to 114 end if end moveDown on moveUp str put str * 2 into theScroll put the scroll of cd fld "GorillaFld" into gorillaScroll subtract theScroll from gorillaScroll if gorillaScroll > 0 then set the scroll of cd fld "GorillaFld" to gorillaScroll else set the scroll of cd fld "GorillaFld" to 0 end if end moveUp -- part 1 (field) -- low flags: 01 -- high flags: 0007 -- rect: left=144 top=203 right=270 bottom=264 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 210 -- text size: 64 -- style flags: 0 -- line height: 64 -- part name: GorillaFld ----- HyperTalk script ----- on mouseUp if 2 = 1 then end if end mouseUP -- part 2 (button) -- low flags: 00 -- high flags: 0002 -- rect: left=209 top=185 right=271 bottom=231 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: -- part 3 (button) -- low flags: 00 -- high flags: 0001 -- rect: left=210 top=185 right=271 bottom=267 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: ----- HyperTalk script ----- on mouseUp if 2 = 1 then end if end mouseUp -- part 5 (button) -- low flags: 00 -- high flags: 0002 -- rect: left=278 top=192 right=220 bottom=306 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: thumb ----- HyperTalk script ----- on mouseUp if 2 = 1 then end if end mouseUp on mouseDown put item 1 of the loc of me into theH put item 2 of the loc of me into startPoint if the mouseloc is within rect of me then set cursor to hand repeat put item 2 of the mouseLoc into theV if (theV < 206) then put 206 into theV if (theV > 261) then put 261 into theV set the loc of me to theH,theV moveGorilla startPoint if the mouse is up then exit repeat end if end repeat end if end mouseDown --top left corner: 292,206 --bottom left corner: 292,268 --top right corner: 320,206 --bottom right corner: 320,268 -- part contents for background part 1 ----- text ----- If a card is larger than its window, you can scroll around on it using the Scroll Window, illustrated below right. Drag the small box up and down on the white space—which represents the whole card within the window to the left—for a simulation. -- part contents for card part 1 ----- text ----- abcd efgh ijkl